<?php
namespace app\api\common;

/**
 *  定义错误类型
 */
class ApiErrDesc{

	/**
	 *  API通用错误码
	 */
	const ERROR    = [0, '请求失败！'];
	const SUCCESS  = [1, '请求成功！'];
	const PARAMSERR= [2, '参数错误或不完整'];

	/**
	 * API验证码错误码
	 * Error_code:  1000~1005
	 */
	const REPEATSEND = [1000, '验证码,每60秒只能发送一次!'];


	/**
	 * API用户注册登录错误码
	 * Error_code:  1006~1030
	 */
	const AUTHORFAIL   = [1006, '授权失败，退出后请重试！'];
	const ACCOUNTDEL   = [1007, '账号状态异常！'];
	const AUTHORAGAIN  = [1008, '授权失败，退出后请重试！'];
	const REGISTFAIL   = [1009, '用户注册失败！'];
	const LOGINERR     = [1010, '用户名或密码不正确！'];
	const AVATORERR    = [1011, '上传头像失败，请重试！'];
	const ORIGINFAIL   = [1012, '原密码错误，请重输！'];
	const PWDINSERTERR = [1013, '密码修改失败，未知错误！'];
	const BINDERROR    = [1014, '绑定失败!'];
	const NAMEEXIST    = [1015, '该昵称已被占用!'];
	const NAMEINSERTER = [1016, '修改昵称失败!'];

	/**
	 *  API公共方法验证错误码
	 *  Error_code:  1031~1080
	 */
	const TIMEERR      = [1031, '时间戳不正确！'];
	const TIMEOVER     = [1032, '请求超时！'];
	const MACLOST      = [1033, 'mac不能为空！'];
	const MACFAIL      = [1034, 'mac校验错误！'];
	const TELMAILER    = [1035, '邮箱或手机号不正确！'];
	const EXISTPHONE   = [1036, '此手机号已被占用!'];
	const TELNUMERR    = [1037, '此手机号不存在!'];
	const EXISTEMAILRR = [1038, '此邮箱已被占用!'];
	const EMAILNUMERR  = [1039, '此邮箱不存在!'];
	const CODETIMEOUT  = [1040, '验证超时,请在两分钟内验证!'];
	const CODEERROR    = [1041, '验证码不正确!'];

	/**
	 *  API产品错误码
	 *  Error_code:  1081~1100
	 */
	const PRODUCTSDOWN  = [1081, '商品不存在或已下架！'];
	const COLLECTIONERR = [1082, '收藏失败，请重新提交！'];
	
	/**
	 *  API购物车错误码
	 *  Error_code:  1101~1120
	 */
}